Port rest of code to CS and remove old JS files.