Reorder & rename some functions