Improvements

@TalAter since you didn't answer my [comment](https://github.com/alrra/annyang/commit/be13ecb465f6fbe085dfd5022944f847b1d8411f#commitcomment-4076557), I made the pull request. Take whatever you think is best for your library.  :)

side note:  `this` refers to different things on different platforms, so I use `window` instead of `this` just to make it clear that this library is intended for browsers and not something else.