build search page and tidy