made addZoom function so that zoomIn and zoomOut do not create fake mousewheel events.
made the panning system simpler and the move at the same speed as the mouse.
some general code cleanup.