cleanup tmpl