Adding general closest point computation (can be sped up significantly with more analytic work)