bug fix introduced in 054141645edd8
Updated ResidualParameters with additional parameters w.sd for ResidualW
standard deviation.

Updated tests with fringe cases where outcomes are non random as much as
possible.