Minor JS changes suggested by linter.
Compile changes while trying to fix 'n is undefined' error when main-built.js is used in Release mode. Still receiving this error.