Mass of fixes to template.