Cleaning up the templates