Refactor fitler and request