Improve REPL multi-line behavior