Work on prolog datamodel and libdl fix for nices