avoid any jshint warnings

I wasn't able to test this, but please consider the following changes for merge.  I squelched all jshint warnings with a few simple changes.

library in ready_invocation was being created in window, which I think could cause problems.

I changed the eval calls to library in window which I think will be as safe as what was there before (without the eval).