Improving peakfinding method!

More changes