refac kernel layout
move repl to own library