Factoring out the iframe