Type resolution refactoring