Factored stack dist specific code out of the DistCalculator into the DistToStackCalculator.