Sorry Nancy, but I can only help in very simple matters, things that I can solve in between my own problems :)
I have a tree that does something similar to what you do (probably simpler), and my code is a mixture of select statements, cursors and tree commands so I thought I would throw the idea here.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges