Tidied up the search fragment a bit.