changing the interface for substitutions + improved unification.