Some improvements to the REPL