Remove duplicated code when adding arguments.

Removed 100 or so lines of argparse options replacing them with functions.

Tests pass successfully.