Better entity id creation