As early as the period of the unification of Upper Egypt and Lower Egypt, towns were supplied with a protective wall; settlements of several thousand people are known from the prehistoric period. These early towns usually have a clear plan of interconnecting streets. Such a street plan can be detected down the centuries. In the middle of the town was usually the temple, which governed the further organization of the town. After all, the temple's processional ways, just like the temple itself, were out of bounds and thus the areas around them became separate quarters. Often people from various social scales, or even, as in Alexandria, from different countries, lived in different quarters. Usually the houses reflected the social status of the inhabitant. In addition to small huts there were also large villas with gardens and houses with several floors. It is assumed that this type of house was the result of a lack of space in the towns, but similar ones have also been found in more spacious locations in smaller towns. Streets in the towns were sometimes hardened, and even drainage systems have occasionally been found. Many towns were important throughout Egyptian history, including Elkab and Buto (the predynastic capital cities of Upper Egypt and Lower Egypt respectively) and Memphis (the capital city of Egypt throughout the dynastic period). Other towns suddenly became important after centuries of being villages (for example Thebes, from the 11th Dynasty on), or were founded at a certain point in history (for example Akhetaten in the Amarna period, Pi-Ramesse in the early Ramesside period or Alexandria in the Ptolemaic period). The exact foundation of many smaller communities, usually workmen's villages, can also be determined, if the workers were housed there for a specific reason under one or more specific kings, for example Wadi el-Hudi in the Old Kingdom, Kahun under Senwosret II and Deir el-Medinah from the early 18th Dynasty on. Large parts of the towns known from antiquity have been destroyed by later construction work, not only in modern times but also in antiquity, because the centrally positioned temples were continually being expanded.