recovered old debug, more type operations;
added Comparison, Precedence and Orderings to deal with term (partial) orderings