Modifies JS for lazy loading