switch GIL classes to PIMPL pattern