Slight code cleanup.
Added a new UntypedExpression class as a supertype of TypedExpression and modified one place where we don't have the type of the expression to use that.
This eliminates some of the unpleasantness caused by the difference between Eclipse's Expression and my TypedExpression, as I can now just wrap any Expression in an UntypedExpression.
Heuristically avoid unnecessary casts.
Unnecessary casts are those added by equivalence expansion when we already have an equivalent non-cast.
Update weights.