Fix classEntry for \IteratorAggregate, undefined variables and cleanup unused ones