more Javascript clean up