Make zooming and panning smoother (hopefully)