Fix remaining bugs in the code. Kernel now boots and fully functions