Good tree

Refactored Tree class and add some test to Tree.t