jshint and stylistic cleanups; no functional change