there were walls around what had been the original town , with gates leading through them on the main routes , but now the town had spilled out to form a sprawling complex of buildings of various shapes and sizes .