further javascript cleanup