remove some unprincipled js* usage