Clean up of debug output and small fixes for parallel runs.