Changed peak detection to take the latest peak in the sample. Hopefully this will get rid of the overtones i'm getting