Created a common base class (Expression) for Term and Substitution