committing from Main comp. Modified KDtree code and fixed the brute and fast impl