Fix accidental globals and enable JSHint Flag to detect them

As a developer, I don't want to accidentally pollute the global
namespace and rely on global state.

I enabled the JSHint flag in the grunt task and removed all 
the globals.

PTAL @deathbearbrown and @garrensmith