Simplified. Optimization based on mean spectrum.
Reverted to old (functional) error estimation.
Added diagnostic plot and printing of all acceptance rates.