Added depth argument to aggregate functions

Can now do multiple groupBys and process each level independently
Merge remote-tracking branch 'origin/master'