Added serialization for Text