Made iframe tests pass. Fixed few bugs