REPL loop fully implemented