Fixed MerkleTree bug.
Added tests for merkle-tree.