Added ability to take arguments from command line.