refining Kernel writer, runner and generator.