Fix typo.
Handle modifed-and-added/removed diffs.
Extract methods for clarity.