Removes dependency on defaultdict in event.py