More gesture system.  Beginning of main controller class. Misc refactorings.