added scope to _this to prevent populating global scope

Leaving the `var` out of `var _this` causes `_this` to populate the global scope and can cause unexpected behavior.