Factored out iterated folds.
Cleared up a comment.