refactor install code out of search view (bug 995418)