why are medieval towns important