Starting refactoring of filter to make them more generic