adjustments to scripts and a couple of snippets