Refactor filter form for search