Added serialization feature.