Basic search is now working
Refactoring search