The easiest way to beat this is to beat the original stop. If there's no probable cause for the original stop, then the search and everything they found is "fruit of the poisonous tree".
Too bad you consented. So you can't quash the search. This is why I tell my kids "don't ever give them permission to search."
Other than that -- hire a good criminal lawyer. Best way to find one is to ask someone who works in the courthouse who is not actually a defense attorney himself, like a civil lawyer, a court reporter, a bailiff.
last time i knew, permission to search the vehicle is not permission to search the glove box without specific consent or a warrant.