Made repl argument parsing more robust and cleaner