Remove junk from template.