Improving componenttree unit test to check highest fork. Also fixing algorithm to get the test passing