Modified GetTreeSig and finished test cases