Tried to make approach a bit more holistic. TDD can suffer from being too iterative.
Cleaned up code, added new tests.
Merge pull request #2 from Chris2048/master

Ok, all pepped-up.