Reorder functions (no other changes)