Use JS2 mode for Javascript; clean out unused code.