Added handling for swipe gestures