Better cleanup, support for older kernels