iframed thimble, rebased to master

No idea why the other branch refuses to properly rebase. This is the `iframed` branch, applied to master as a diff patch so that it's a single commit.