Small refactoring of jid module.

Subj.