Reorganize flags