Second commit of aggregation operations. Parallelism. Needs cleaning up