More refactoring of ckernel_builder