Added basic XMPP support
restructured the code for better integration of XMPP
finished xmpp integration and restruturing of code