cosmetic code fixes + logging improvements. Unit test
FailureTest.testFailureRestart still fails.