General fixes to gesture detection, rudimentary event handling once gestures are drawn.