Added event handling and tracking
Events that are not flagged as handled are logged in console.