by the middle of the 20th century , scientists believed they were well on the way to treating , preventing , or eradicating most of the most deadly infectious diseases that had plagued humankind for centuries .