Refactor syncToGoogle() by extracting methods.