First implementation of "Center of mass" optimization