Added methods for obtaining descendants and ancestors of nodes.
Added unit tests for descendants and ancestors methods.