Refactored line aggregation