Updated to match new iframe-friendly engine api, tests pass