Avoid Ivy types by inlining MatcherHelper and using our classes.

+review REVIEW-5257