Pull out argument parsing