Added functions to aggregator.py, will now be called daily as part of an existing cronjob