Remove commented code and fix an intermittent test failure due to a race condition.