more work
refactoring to put imap in one package, xmpp in one and the actual monitoring stuff in one.