1718 aggregations

Aggregations has been tested. 
I did merge master on to the branch, so shouldn't be that complicated to merge.