A (seemingly) good test suite.
Fixes #2.
Maybe I should get a coverage measurement.