Changes in parameters to be adjusted.
Correct treatment of weight vector.