Improve event-handling.