more javascript cleanup