Add basic serialization.