Is it safe to assume that it could have made significant strives towards closing gaps with the West as early as the 18th century? Or any other time before the Opium Wars? If not, is it possible for the Qing to realize what they're facing just after the First Opium War?