Flexibility and Commitment in Planning