Remove document.write