Divide normarize_diff() into two parts
Use XS version of diff
Fix documents