Added test for local 'window' var, moved comments