Refactored out ITemplateAggreagor from IDefinitionManager to simplify dependencies in several scenarios