More work on Prolog datamodel