added some better logic to clear iCloudAccounts once the config changes.