Implemented TemplateManager completely