Added command line parsing via getopt_long