Started updating the tree check code for verification, need to check/verify the CK algoritm after