Reworked entityid.