cosmetics: Reorder functions to avoid forward declarations.