Also, try to fix the API helper objects to persist the referenced struct (best effort only, though, it is still possible to break things when not careful)