wip: repl refactor