small changes in Type and ScopedTerm