Implement repl (in progress)