Added pan gesture to main view