Moved REPL code to server.repl