BROKEN: Make better use of Mongodb aggregations