Seperated Filter logic from main application logic.