Added support for events.
Merge remote-tracking branch 'origin/master'