Refactored sync local code, and added syncing for the attendance spreadsheet