A few things I'll offer:
* Never mix trade discussions with the purchase discussions. Keep them separate transactions entirely. If at all possible, sell your existing vehicle separately, as you will almost certainly get more for it doing so. Yes, its a bit of a hassle, but its worth the $$.
* When negotiating, always work *up from invoice*, NEVER *down from sticker*. Invoice is as close as you can get to a dealer's real cost, which is much much lower due to things like holdbacks (around 1-3% depending upon model), floor plan allowances (varies widely) and other incentives.
* CR's car pricing service can be invaluable, although similar information is often available from some credit unions and other sources.
* If you opt for a long-term vehicle warranty, get it from the manufacturer, not the dealer. A manufacturer's warranty will be honored at any corresponding dealership, where one from a dealer may only be honored at a handful of locations anywhere. I, personally, am not a fan of what I term "blackmail money" and do not encourage people to purchase such warranties - esp with so many vehicles now being offered with long-term stock warranties.
* Arrange your financing in advance, preferably from a credit union. In the view of the dealership, that makes you a cash customer. Weight that carefully against dealer financing at 0% or with rebates. That's something you just have to sit down and punch out on a calculator - no one perfect rule fits here.
For my last vehicle, a 2008 Sienna, I did my cost research, got invoice numbers, computed my estimates of holdbacks and incentives, and then calculated what I believed to be a reasonable price I'd pay. I then created a temporary gmail account and sent RFP's to three dealerships telling them a) exactly the model, color, and options I wanted, and b) to provide their best and final offer/"take price" on the vehicle, inclusive of ANY and ALL add-ons such as ridiculous "Dealer prep fees" and "paperwork fees" and "advertising charges." Those are all three code for "extra profit extracted from consumer."
Within 24 hours, I received three replies - one offer was out of sight ridiculous, one was meh, and one was within, as I recall $100 (perhaps less) of my computations. Told him I'd accept the offer, would tender him a check to secure the deal the next day, and it was delivered the following Saturday. They tried to zap me with the prep fee when I picked it up, and I showed them the printout of my offer sheet that said their offer was inclusive of all such fees, and they dropped it.
The "winning" dealer in this case was one of the few dealers in town at that time that had a real Internet presence, and I happened to sneak a peek at a dry-erase board in a back office that had salesmen's names on it with "sales tickmarks" - one sales names was "Internet" and it had easily three times the number of ticks the rest of them did. It was a nearly flawless transaction and I was entirely satisfied with the deal.
A few other thoughts: Some folks believe dealerships will really work to get cars off the lot that have been around awhile, when in reality the reverse is true. The longer a car sits in inventory, the more finance charges the dealer rolls up to the manufacturer, thus the less likely they'll be willing to offer a near-invoice deal. Snag a vehicle when its coming off the truck, as it were, and you're likely to get more latitude.
My very first car was purchased "pre-Internet" with my having gone to a dealer, invoice and holdback numbers in hand, with my telling the salesman that I'd purchase "that" car (to which I pointed) for exactly "this* amount of money (and not one penny more), and handed them my pricing worksheet. The sales guy looked at it, disappeared for a second, came back and said "we'll do it." I was out the door with my new car in an hour.
Bottom line: Information is power, and dealerships rely on customers not having it. Good luck.