Implemented deserialization.