Guilds were organized in medieval towns to __________. A provide for defense B administer a system of justice C regulate production or trade D organize religious worship