beginnings of type unification code