Clean up Makefile. Move terminal stuff out of kernel.c into terminal.c file