Automate

added command line parameters, a start batch script, and optional logging to file