Following JSHint

I noticed that your project has a `.jshintrc`, so I ran `jshint .` and refactored the code base to fit the rules better.

Now, it should look like:

    $ jshint .
    extract_values.js: line 2, col 33, This function's cyclomatic complexity is too high. (6)
    extract_values.js: line 48, col 9, 'window' is not defined.
    
    2 errors

I left these alone for now, I'm not sure how to resolve them.

In web browsers, `window` is defined globally. And the reason the function complexity is "too high" is that the code is using the JavaScript convention of wrapping your code in a function and executing it to avoid polluting global scope, and that's a *good thing*. So basically we need to tell JSHint that this is web browser client code.