Refactor the command-line argument parsing (again)