In the medieval period the wall circuit was expanded. During which historical period was the wall circuit expanded