Added logic for kernelRunner, fixed some code