Made the entity defining system more flexible