Some XMPP optimizations