Apply consistent, type-safe idioms and keep logic/formatting easy to scan.

Use these guidelines to guide refactors during reviews, not only new code.