Refactor for Readability
Refactor the code below for readability and maintainability without changing its behavior. Improve naming, reduce nesting, and remove duplication. Keep it idiomatic for the language. Return the refactored code, then a short list of what you changed and why. Code: [PASTE]