Searchbar is now working!

small code fixes and cleanup