Added better semantics for flags and IDs