Fixed the entity inheritance tree and a couple random bugs