Fixed properly resolving package based on operation
Fixed diff (conflict moved to $a and $b)
Swapped diff order
Another rewrite....