Add serialization/deserialization
Fix typo