A lot of debug statements, and a some minor code changes to stop
failures.