Code cleanup for simulate_car