The main application code now passes JSHint and JSLint.