Added the gesture recognition code. It is not complete yet.