overall improvements to template rendering process