added better use case in tree spec test code, refactored out tests so they comment well in Doxygen