Misc changes for REPL