Refactor REPL code. Looks much better. (At least to me.)