In early modern times, cardinals often had important roles in secular affairs. In what roles did cardinals have important roles