Change widget and layout structure.

I believe this change would be unnecessary if you just passed in `document.body` as the parameter.