I cannot configure Mail 5 on Lion to work the way I want with Google GMail I just spent a good hour on Mail app, and its pissing me off. 

First archive button is dumb, it actually creates a label called [imap]/archive.

Sending messages is dumb, it actually creates a label called 'Sent Messages'

Deleting messages is dumb, it actually creates a label called 'Deleted Messages'

I don't understand how can the iOS version work well, while the Lion version behaves completely different. Does anyone know how can I get around these problems? My current solution is to use Sparrow. I have also tried looking around the stackexchange websites (superuser and apple), Apple forums, MacRumors, Google, etc..

Other topics with no solutions:
How do I get archive to work in Mail.app in Lion?
http://superuser.com/questions/315171/how-to-stop-mail-app-in-lion-creating-an-archive-folder-for-archiving-in-gmail
Gmail is not exactly IMAP so needs some manual configuration

You need to go in Mail to the folders under your Gmail account and on Trash/Sent Messages/Deleted Messages/Junk select each one of these and then in Mail choose Mailbox > Use This Mailbox For the corresponding Draft/Sent/Trash/Junk.

I originally did this from a very clear set of instructions that I cannot find now. However another set are here.

I also go to the web Gmail Settings and turn off the Show in IMAP check box for the All Mail tag. This means that I only sync one copy of each mail to the Mac.