With the abolition of the charters of Valencia and most of its institutions, and the conformation of the kingdom and its capital to the laws and customs of Castile, top civil officials were no longer elected, but instead were appointed directly from Madrid, the king's court city, the offices often filled by foreign aristocrats. Until when was the Lonja used to quarter troops