Does not seem the police did anything out of line. The points you raised may be totally at the discretion of the investigating officer, not amounting to any violation of criminal procedure or evidentiary code. Meaning, these, even if the police did something wrong, would not help you in court. You should focus on how to fight the traffic ticket.
One thing, the officer gave you a ticket for following the car in front too closely, which, from your original post, could be true. How do you know the same officer did not give the driver of the car behind you another ticket of the same kind? Both of you could be at fault.
Last thing, you could think there was racial discrimination, which may exist. You need proof and even if you do, I am not sure how it would help you in a traffic court.