lots of changes to shell scripts