Gestures handling refactored.