Updated examples to show best practices for preventing pollution of the global scope.