Added deserialization to model.