Tidy up db syncing code