Removed redundancies from filter.py.