Add shell options for remaining scripts
Remove underscore convention for error code returning functions - now shell option terminates script on error. Remove some empty lines etc.