Take care of a couple of compilation warnings
Move around a bit of REPL code