Fix peak_detector parameters being global (VERY BADmake testmake test)