Revert "Overall: migrate to proper JS usage everywhere."

This reverts commit 8921e2249fffeef7bb0c12a93f98d5ec559d8744.

No need in this, this is not the reason of occasional segfaults on some
machines.