code clean-up and error fix in addRandomVehicles