fixes to script, directory structure