The bad idle happened to a friends Cummins. It ended up being the crank position sensor. He didnt have the smoke though.