The castle was extended, and in 1582 the Town's College (the precursor of the University of Edinburgh) was founded.
The Town's College was a small condominium. 
mnli hypothesis: The Town's College was a small condominium.  premise: The castle was extended, and in 1582 the Town's College (the precursor of the University of Edinburgh) was founded.