Add a handler to grab kernel from any context.

Need to convert a lot of random hacky things to use it.