Refactored script.  CChanged from getopt to argparse for better argument parsing.