I was adding comments as I was debugging the problem.