Changed the code to get the gestures working