Implemented remaining classes to enhance template contexts with TemplateDef information at runtime. refs #500