Remove unused functions in kernel.c