get some cleanup done on the merkle tree code, still needs to be organized