Just barely working, and tons more todo, heaps of scope for refactoring and renaming, a bucket load of tests to write