Converted to use argparse