Adds more aggreate functions, adds aggregate tests

It's possible to have aggregate functions inside aggregate functions
(not that usefull but..)