Correctly inserts additions and removes deletions by line number.