Fix type application in elaboration of class and instance.
Elaboration of terms, buggy atm.