Unit test all the things. Fixes #1.