DNN-3395 Phase 2: clean js code.