src: make BaseWrap a class member

It's not necessary that all classes inherit from BaseWrap, so make it a
class member where possible.