Refactor some search stuff

I agree 100%