Addressed issues found by gjslint and jshint.