Making MyTree a member of the Functor type class

This should be much neater than the previous way, but it could probablly
still do with some work