TemplateFactory class now takes responsibility of loading templates.