Get rid of the notion of entity reference, and move all URI related
logic outside the model.