JSHint run-through

I ran these two files through the JSHint static analysis tool on
Notepad++. I checked these options under 'Warn': 'About == null', 'About
unsafe comparisons', and 'When blocks omit {}'; I unchecked these
options under 'Warn': 'About unsafe for..in', 'About functions inside
loops', and 'When code is not in strict mode'; I added "maxerr: 9999" to
the Additional Options field; and I left the rest of the settings as
default.
Other than that, I ignored the warnings involving functions within
loops, bad for-in variables, and iteration variables-- or variables
within their own block-- already being defined.

Some of the fixes also pertain to our current Coding Standards, so I
guess I could say this is also partially a code review.