Added conversions to and from a serializable form