Added argparse and main functions