Clean up whitespace.
Remove some duplication in the templates.
Enable reloading of the templates.