Initial implementation of stats aggregation