Added more logic to peak detection. New peaks need to be above a certain threshold greater than the current peak. Also, added logic to the algorithm so that if the divider ever goes delow 10, it gets set back to 10.