Rearrange the code.
Split the shell part from kernel and move some definition to kernel.h!