Making progress with tests.

Which forced some refactoring (yay!)
Re: #17.