Added binary serialization.