actually fixes the search context, I promise.
gets rid of code duplication
fixes tests
Merge pull request #209 from osulp/feature/thumbnailImg

actually fixes the search context, I promise.