Add immediately invoked anonymous function to prevent scope creep.

See title, but just a quick fix if we're starting to do more complicating things that require holding variables in memory, and we don't want other extensions/JavaScript code to accidentally overwrite anything.