Moving event handlers into their own package, some cleanup.