Minor changes / improvements to shell scripts