Rewrite Filter class as a proper abstract base class.