Cleaning up flags