During the settled village stage of the Mesolithic period and Neolithic period, people became sedentary, formed villages, and domesticated herds of animals. They lived in close proximity to the animals and contracted diseases such as salmonella, anthrax, Q fever, and so forth because of cross-contamination of water and food supply. In the hunting and gathering stage, groups may have avoided many contagious diseases because the scattered aggregates were small, nomadic, and separated from other aggregates. In the preindustrial stage, large urban centers formed to support the expanding population. In the industrial cities stage, there was an increase in respiratory diseases such as tuberculosis, pneumonia, and bronchitis and in epidemics of infectious diseases such as diphtheria, smallpox, typhoid fever, typhus, measles, malaria, and yellow fever.