Fix event handlers, add ability to clear events