Rename scope to targetWindow, and clarify comments.