Made some changes to aed() and peakPick() to improve peak picking.