The big rule for dealing with the police is: 'polite minimal compliance while asserting your rights'. Don't ramble on. Don't let them in. Don't provide ID unless you're statutorily compelled to. Don't pop your trunk without a clear reason. Politely scold them if they go for your glove box or try to flip open your smokes. For the love of god keep it simple and never incriminate yourself, even if the cop has a 90% idea of what's going on. The flip side of that is be polite, respect their authority, and hope for the best.