fixed typos in scripts. Also made minor changes to commandline interface