I've never been the best at negotiating, but I did go on a work course recently. Key points seemed to be:
Be well prepared. In your case this would be knowing book prices, trim levels, similar local cars.
Trade, for example, if you... Then I.... This allows you to agree a lower price by stealth then bump it up with stuff.
Set your range. Your initial offer if they won't open should be lower than the lowest you think is achievable.
If you start trading, do it from your end, rather than theirs.
Move in small steps rather than big jumps.
Don't believe anything the salesman will tell you, trust your research.
Remember it's a game, and you can always walk away.
Remember your initial reaction when he offered you 8k for your Mazda. If you don't get that from the salesman with your first offer, it's too high.