Using getopt instead of Argp, cleaned up main