Flush flags constants, some code reformat