clean up templates and