Finished working out command line option bugs