Converted aggregations back to the Mongo aggregation framework