minor jshint cleanups
fixed redeclarations due to javascript hoisting