Added XML and JSON encoding, increased size for text arrays to 2048 characters