More refactoring of aggregations