DRY up sync functions.