Added main event loop and dispatch events
Removed boxed event handlers
Fixing minor errors
Added event_name context data methods