JSLint fixes
Additional JSLint fixes

Remaining JSLint issues include unused variables that seem to be used
somehow, and a TODO.