Added support for binary serialization.