Added "if __name__" logic to use script from command line and command line options parser