Added commandline options with getopt.