Refactor slightly and add tests

This pull request adds several critical features:

* Complete test coverage
* A readme
* A new design for the analysis component

(Note: while the analysis component is easier to use now, by injecting methods directly into the Gesture object it risks clobbering future methods. The design may change again.)