Refactord home search form