Latest version of kernel.c (sorry for the weird commit with folders and stuff).