Change the key parsing for more flexibility.
Merge branch 'refs/heads/imap_sort' into private_branch