Model Predictive Control with and without Terminal Weight: Stability and Algorithms