Removed extra code to just isolate the CSV-loading code and if-statement.
Removed extra threshold calculations.
Removed extra peak_areas_XXXXX lists.
Removed extra num_of_peaks_XXXXX lists.
Added a sanity check to make sure the expected number of peaks are actually present.
Commented out if statement block.
Uncommented if block and changed the list that's being iterated over to avoid the problem of unpredictable behavior when itterating over lists while changing them.