Flags implementation.