These are great. And yes, these would be great long term if they were template tags or something similar. That way we can easily incorporate them into well-built components. But excellent job.
You may want to think about commenting the code in the pastie site itself, since some may stumble upon it in a manner OTHER than this forum post. Just a suggestion.