It looks like we really don't need these two maps, keyed off id. We only use it to iterate over the entities and to get the corresponding entitySpec. So could instead just use:

    `Map<Entity, EntitySpec<?>> entities`