latest fixes
Integrated Michael's last fixes to the peak ratio calculation
latest master merge
Post-merge fixes
Post-merge fixes 2