refactor and js-signals