Follows up on unresolved suggestions from #22838. In order of priority:
- Fixes a couple of typos [^1][^2] and indentation to conform to Markdown.
- Solves
for-loop nit [^3] and also limits variable scope. - Clarifies data relationships [^4][^5] by introducing
structrather than comments.
[^1]: #22838 (review) [^2]: #22838 (review) [^3]: #22838 (review) [^4]: #22838 (review) [^5]: #22838 (review)