Cleaning up XMPP a little

Formatting and some other changes, in attempt to get this working or clean enough to be less annoying