TypeResolver refactoring