Serialize and deserialize cell/module