Refactoring which will make easier implementing smart lists