Excuse my JS ignorance, but why is this code wrapped in an anonymous function? Isn't it already adequately scoped?