TemplateFactory updated