implemented smooth moving and smooth zooming on touch, refactored code a bit