Major cleanup towards final release. Removing event handling.