Upparcases in jid

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