Satisfy JSLint

JSLint complains about functions being declared in blocks.