Split webserver and xmpp client into separate files