remove dependency on passing unsafe pointers around for objects and store the details within the js context itself