Added code to deal with command line arguments.