Nearest Neighbor Search optimizations