Clean up the templates markup