Better implementation for resolving conflicts.