Quite a lot of refactoring, but now also with a shiny new AMPQ transport option. However, XMPP is most likely severely broken.
Forgot to check the local transport after all the refactoring for AMPQ.