Improve JID parsing
Adding initial tests for presence