small cleanup in the js