Use strict, and add declarations to pass jshint.