Move `LayeredFilter` to `base.py`