Updating code to use xmpp library.