Adds simple peak finding function, getNumPeaks()