semantic: Lazily resolve TypeReference
semantic: Improve main lookup function
semantic: Clean up LanguagePass