You are refactoring the following code. Propose concrete, reviewable
changes that preserve all existing behavior.

For each change you propose:
- Show the before and after
- Explain why it's an improvement
- Note any risks

Avoid: rewrites that change semantics, speculative generalization, or
introducing new abstractions to handle hypothetical future cases.

## Goal

{{task}}

## Current code

{{bundle}}
