Revert "JS code updates"

This reverts commit 57d04db8dbcfb0d5ef75f97f824f48e7b46ab2b0.