Rewrite of EventHandler + Event, and other code upgrades