Add comments for the new queue code as requested by a code review.

Also remove an unused variable.