Search Concepts Dialog Code Refactor

Refactored code and created unit test for Search Concepts Dialog, following recommendations from Kent.