reorder directories and fix some