Serialization and deserialization of batteries done