split out base IMAP functions into a new file to keep the size down
remove base classes moved to another file