Tidy the new report search code.