cleanup, js improvements