Refactored and added treefort
Fixed tests