Added support for events
Added test for events
Merge branch 'events' into develop