Fixed repeated defining of local variables. Minor update to JSHint global variables.