Ndl: minor javascript cleanup