Gestures handling optimizations