damn man, sorry to hear, but luckily you came out unscathed. Unfortunately, no matter waht happened up the road, you got the ticket because you were in fact following to closely. Did you have a "2 second" gap between you and the car in front of you? You should have been able to out brake ANY of those cars, the fact you did hit one tells me you were following to close. Even though it was your fault, if you dont have insurance, i would try to take it to court so you could get reimbursement possibly for our wrecked shit.
__________________