Minor code cleanup to template.html