Upparcases in jid

Small fixes and tests related to discussion in #120

Note. This pull request goes on top of #281
Looks like a copy-n-paste symptom :)