Updated so the code can run command line arguments.