Added JID parsing functions.