Converted optparse to argparse