Fixes for jslint
Don't hoist var statements (should make variable assignments easier to read)