Use write-document throughout. Render-function cleanup done.
Fix write-document to work for feeds.
Rearrange source a bit.
Fix thinko in write-document.
Minor tweak to the RSS template.