Minor changes, mostly to pass jshint.