Update the event framework and add some basic tests.
Add event handler and tests