Implement diff filter. Needs testing.