Re-ordering logic for exit/clear repl commands.