Added TemplateFactory