remove obsolete todos
minor refactoring
fix handling of qualifying types in addToIntersection() for #541
fix handling of qualifying types in getPrincipalInstantiation() for #541