Refactoring to drive argument parsing from single place.