Added ability to run from command line.