Move to use opaque keys

While I could not find a use case that my changes would fix, the updated version seems to be running fine too.