First commit of aggregation operation stuff - needs a lot of cleanup