Got rid of the bpm_detection method and put it in main.