Shutdown cleanly when the driver is stopped.

Hmm... different way of looking at it.  I do worry about the state driver getting more and more complicated though.  Time will tell.