Merkle implementation