clean up messy template syntax for single page