Rearrange to reduce forward references.