Optimized the canRecognize/recognizeGesture logic.