Support for the urgency hint (issue #25) and event handling cleanups.