Simplify REPL code