Use new data structure to represent nodes

Now every key acts like a separate binary tree.