Fix repl input position.
REPL: add result presentation inspection.
clean up repl code.