Remove duplicate flags, add some