Add function to add and remove flags from the info part
Use List.to_tuple where possible