removed legacy xmpp api stuff, some refactoring