Aggregate steps records, refactoring