Better Peak Detection

Still a problem that an offset is being added to data as a function of
time.