Added Tree implementation