Targeting optimizations

Always used distanceSquared!
Rename an overlapping variable to avoid confusion