KernelBuilder refactoring