More javascript cleanup