Implemented TemplateGenerator. refs #418