Clean up template file