Medieval Europe was characterized by the rise of castles and towns. Castles served as military defenses, estates for lords and symbols of power. Towns grew around rivers for trade and transportation. The population increase contributed to the rise of towns and agricultural innovations improved food production. Town planning evolved from unplanned settlements to the establishment of planned towns with gridded streets and walls for defense. Carcassonne exemplified the walled medieval town with its double row of fortified walls and irregular internal layout centered around the market square and castle.