refactored mouse event handlers for Events, added handlers to Gateways