Overhaul Tests

We now have reasonable unit tests. Run them often!