move tree_view into ExtendClassMethods module
add test for tree_view method