Converted codeGen to use argparse