Coding style, "use strict", fix a couple of scope leaks, add and pacify jshint.