A class to allow easy filtering on models