Ive been in similar situations before.
First off as most people have mentioned already KEEP YOUR NOSE CLEAN!
Its the most important rule. Remember cops dont make laws, they enforce them. So ensure your car is 110% above board regarding vehicle rules and regulations. Also ensure that you have a clean slate (clean it NOW) of all behaviours (inluding old parking fines etc).
Remember the golden rule that wins always.
KILL THEM WITH KINDNESS.Nothing drives cops more mad than someone they cant touch and is being NICE to them.
Example. always address any police officer as "sir" at all times with a big smile and manners expected of a royal prince ( and make it seem genuine).
If the heat is on (ie coppers are out to get you) then don't snap cause that's what they want you to do, simply acknowledge any police officers request with.......
....."yes Sir, but may i enquire as to the reasoning to this [insert situation here] beacuse i am genuinley feeling like im being harrassed..."
You need to practice this line many times so it comes out very fluid, natural and honest, making sure you say it with concern and not in a sarcastic term.
The word harrasmant is the big NO-NO in the police force and any group of officers (groups are better for you as you have less chance of a "cowboy" if their peers are around) would back away instantly and know the gig is up if you produce this statement with the following up of gathering their names.
I do suggest you keep calm and dont over react everytime you see a copper. In fact try and find a "cops are tops" sticker or a checkered ribbon for you car. They wont know who they're dealing with.
Good luck

:
PS: make sure you cars not too loud, and tyres ahave tread etc etc etc.