Replace check for existence with check for NULL value
Modify several comments in script
Remove statements that assign return value to global