Optimizing gestures and other code clean up.