Event handling added to EventDefinition

Basic test in test.py -- seems to work!