removing iframe and optimization of js