clean up templates