Control and Optimization in the Probability Space