Draft deserialization.
Fix id random generation.