Complete rework of GetBestTarget, please test this should be way better to work with