Separated setup for recursive calcTargets out so that it doesn't reset the values on every cycle of the recursion.