Cleaning up templates and paths