lots more doxygen work, plus refactoring of tree self-tests