I think you can use a IMAP client like Thunderbird to clean it up.
(I say "think" because while I use a gmail account in my email client, I only use it to receive notifications from Google, so no wild folder/tags setup, and I never check the webmail to see if it matches the emails I see in Thunderbird)