Rewrote some of the target calculations.