Improved aggregation function support.
However, grouping needs to be redone :/