Upparcases in jid

Small fixes and tests related to discussion in #120

Note. This pull request goes on top of #281