Got search working, but have to fix some issues