Adding REPL loop, function, updating main