I am sorry to learn about this situation.
Unfortunately, with a used vehicle the dealership has somewhat limited obligations regarding quality (particularly aesthetics).
If there was a warranty that accompanied the vehicle, this will be your strongest source of a claim - this can be a warranty that was issued by the manufacturer, or a warranty that was issued by the dealership.
If you find that the dealer made any affirmative misrepresentations regarding the vehicle, this can be useful as well - this must be an affirmative misrepresentation that is very specific (for example "this RV has a newly remanufactured motor" - but upon purchase you take it to your own mechanic and find that it was either never remanufactured, or the service was done, but done a long time ago), general statements such as "The RV is in great shape" are not actionable. False statements must also be something that you cannot easily identify (for example, "Has new tires" - but upon easy visual inspection the tires are bald and wearing through the sidewall - you cannot claim that you "reasonably relied" upon the falsehood if it was something that you can easily see and would not believe). If you find one of these statements, this can be actionable under what we call "fraud in the inducement" and it can make a contract voidable.
It does appear that the dealership is willing to negotiate with you, you appear to have some leverage with a claim to report them to the DMV (this will cause them additional headache in dealing with the DMV and their licensing agency), and you probably can cause them additional unwanted problems by making a claim to the BBB, and other online consumer advocacy/review sites (all of which can drive away business or make more problems for them).
So understanding that you entered into a contract for a used vehicle which does not have much in the way of consumer protections, your dealer appears willing to negotiate, and you can try to get them to narrow the gap for your buy back by leveraging the threat of making things more difficult for them, you probably have some room here - but based only on what you are posting, I do not see a clear mechanism to void your purchase agreement and walk away - when buying used vehicles the best protection is for thorough investigation and inspection (even bringing the vehicle to your independent mechanic prior to purchase) all in advance of actually entering the contract. After buying the vehicle, there are not a lot of remedies.