Solved a bug in refinePeaks.m
Separate module for findPeaks() function