Refactoring DBAggregation module.