* Replaced O(N) code with O(log N). Helps quite a bit with 1000 nodes!