Updated imap tests and some other stuff.