Cleaning up search

The search button now has a null guard

Also Peter cleaned up some of the imports