Commercial Agreements and Social Dynamics in Medieval Genoa