Controlling the Dynamics and Function of Complex Systems