2D range search improved, not completely working though