Restructure code with behavioral parity proven through unmodified pre-existing tests, then refactor. No behavior change.