* Fix builds on newer kernels. * Change shutdown flow slightly. * Bug fixes.