removed broken substitution code
added test showing that templateo doesn't copy non-unification constraints
simplified representation of generic environment