reorder and split into module directories