Merge pull request #28 from jsilvestre/master

Various fixes and refactoring
Added: useful resources such as IMAP RFcs