Added arrowkey controls to viewport panning, cleaned up implementation.