This is just a binary search tree in c.  Pointers suck.