removed unused code in TemplateManager