adding conflict resolution - wip
adding conflict resolution - wip
Refactoring database code