Starting to get a test suite in place, with many concomitant changes