Don't use deprecated functions
Implement handler for events
Merge branch 'events'