Refactoring processing of command line arguments.