cleaning up template file