Convert filter to class based.

Signed-off-by: crynobone <crynobone@gmail.com>