Important tweaks to the Entity API