tidy up, moved creation of preference popup to search menu