More refactoring of type variables.