Use destructured arguments when looping through pairs

Minor refactoring of looping behavior for aggregation