Obama thanks McCain for toning down rhetoric