Add missing variable declarations.
Suppress jshint warning on evil eval.
Pass window into the wrapper (safer probably).