Convert remaining JS to CS