Refator of main JS. iFrames now cached in dom elements after first load