Clarify code paths and reduce repetition.