major re-arrangement and generalization of the objective and their interaction with optimizers