improvements to imap & url classes