These variables, even if you used `var` to declare it, are still globally scoped. They should be inside a function so that the scope will remain in the function. More details here: http://bonsaiden.github.io/JavaScript-Garden/#function.scopes