Made historyprocessor.py to process datastore