Implemented a spike filter.