logging and cleanups
restored Term compareTo(); additional unit test failures because expected term order is different, so many of these tests can be revised