Implemented base client-side logic for sync