Move tree related implementation to separate pacakge.

Because it's logical independent
Merge pull request #72 from EasonLiao/master

Move tree related implementation to separate pacakge.