[core][js] gc engine: update \w replacements, + remove useless code