Add kernel code, libs and some test code