Working on cleanup mentioned earlier, but there appears to be a loop somewhere preventing the tests from finishing. In any case, the new approach made it possible to cut out a lot of cruft.
Reworking tests to fit slimmed down code.
Reworked all the tests.