Refactor some search stuff

rename to order_by?