During the early centuries of Buddhism monks and nuns lived as itinerant beggars with no fixed abode. The practice of staying put during the monsoon season gave rise to permanent monastic institutions. Monks and nuns lived either in viharas, separate structures, or dwellings carved like caves into hillsides (guhas). Many early monasteries functioned somewhat like parishes, offering spiritual services to the local population. These smaller, more pastorally oriented monasteries were eventually replaced by larger monastic complexes with a focus on learning. Many monasteries, especially in Theravada lands, still offer educational services to the people of the area. In general, Theravada monasteries throughout southeast Asia maintain somewhat more active links with the outside community than do Mahayana monasteries. Japanese Zen monasteries, for example, still focus on a life of seclusion and solitude. Tibetan institutions have until recently been the virtual backbone of community life on the “Roof of the World” and were home to an extraordinarily large percentage of the male population. Some monasteries are now part of what one might call consortiums, with as many as two dozen individual “temple monasteries” of the same denomination clustered within one larger institution. Most classic monasteries are walled enclosures divided into private and public areas. Monks’ residences and private ritual spaces are separated from the ritual and educational facilities that serve visitors.