There are some tips in there that help. Most I've learned to do.
I'd like to add something. DON'T TALK!
There is usually very limited information you have to provide to an officer.
No offense to officers of course, but for example, here is a trick question...
I clocked you going 84 in a 65. Did you know you were going that fast?
Answer yes and you admit that you were speeding.
Answer no and you admit that you didn't know what speed your were going.
Say you were going the speed limit and you're probably going to piss the officer off.
My answer: I prefer to not answer any more questions.
Or you could say: I prefer not to answer any questions that have the potential to incriminate me.
So, do what dave_xb12r says, but keep your mouth shut.
Just so you know I'm not full of BS...
I have told an officer when he asked me an incriminating question that I prefer to not answer any more questions. He said okay, went back to his car, came back, gave me a warning. Of course, I had my hand out of the window when he rolled up.
In addition, and no offense to officers, but to my understanding they are legally allowed to lie to you. Know your rights and laws. Don't let them make you do something out of trickery or lying. To an extent, or full extent, they are trying to get you to be as guilty as possible. The more you talk the worse it's potentially going to be.
Keep yourself legally safe, but make sure you keep the officer's life safe. He'll let you know if you're in an unsafe situation. Give the officer a safe situation.