Actually finished the aggr_funs stuff.
- Fixed tests.