Refactor clone method of jid.