Refactored (and reactivated) unit tests.  Fixes #2.