Added (polished) panning functionality to gui.