Refactored functions involved in syncing the source location.
Refactored functions involved in syncing the target location.