removed TemplateFactory dependency, misc