Refactor filters_helper