Refactored SearchMain to Search. Preparing to rewrite search