A better implementation would be nice except that it requires a ton of specialist skill to get right. Plus lots of time. A wrapper is basically an interface. Getting interfaces correctly can be done by knowing what it expects, what properties should always hold, and what happens after each call. Correctness is basically one or more state machines with assertions built in for interactions between front end and library. Much easier.