Getting closer to working code.

calcTargets is still extremely broken.