Added serialization support for binary and XML