Add flag serialization and intialization from serialized data.
0.2.1