Fixed type and added signature for Subst
Translate type substitution to calls of subst
Proper type application type rule.