Change peak detect API to conform to library conventions