Bug fixes + diff_match_patch alg