TemplateFactory init