moved run code out of the Bot object.
added xmpp adapter and some cleanup.