Added zooming and panning functionality