A proposed refactoring of the option parsing code