cleanup the templates