Implement a basic REPL