Reorder some functions