Rewrote the command line parser using argp.