Finishing up some of the search function