Cleaning template files