singleton instance for iframe creation; reformat js;