Minor cleanup and fix gesture recogniser issues.