Aggregation refactoring