cleanup and added basic IMAP connections