Added support for running from command line