Add filter and refactoring.