Replace pointers to global splay trees with structs.