#1763: Merged remaining changes from the TreeSimplifier branch in the trunk and refactored impact values calculators.