Refactor aggregates