Fix JSHint errors, notably use of Array literals and using === and !== properly