Improvements to the event system

* One class for each responsibility
* Added a ton of tests

Change-Id: I02202d977185eb11702ce8b5948288fd04a9c3f7