extracts code to separate TransactionCollection + GroupingCollection classes