Trying to implement remove spikes method

[#57544654]
Improving implementation of remove spikes

[#57544654]