TemplateEditor plugin: Cleanup