close and remove script tag