refactor to use argparse and add --no-import flag