Add unit tests

Closes #42
This is great! Though, the point of this PR was just to add test (and save re-factoring for another PR once the tests are in-place). In fact, I started re-factoring, and realized that I needed tests to make sure I wasn't breaking stuff.