Move JS fixes to CS