Reorganize some file and add basic testing to the Tree entry point
Add in code documentation