Use 'getopt_long'

Clean up 'main' by using 'getopt_long' instead of using a command line
argument parser written from scratch.