Reorder and fixes