Added zoom and pan functionality