kernel.h/cpp cleanup