Moving repl function up one level.