minor fixes, and start adding command line scripts