fix gosquared relying on document.body
rebased and tests pass
merged in gosquared fix