Satisfy JSLint

JSLint complains about functions being declared in blocks.
Merge pull request #224 from twpayne/jslint-clean-ups

Satisfy JSLint