Everything is working.

The code needs cleaned up and the test cases need to be expanded but for the
moment there is 100% working code (as best as I can tell). I will try a couple
of other test cases, but as these are extremely simple there is not much I can
do.