A lot of this code shouldn't be too hard to test. Let's do that once the refactoring (#42) is complete.