initial merkle tree implementation, with tests