[support.cftree] Refactoring (issue #144); Fixed bugs; Added unit-tests