Fixed a few things up. Next on the todo: tidy up the code, add tests, and finish feature