[agent] refactor Search

Small additional refactoring.

Removed unused createViewCidMap logic.
Merge pull request #58 from paulfalgout/search-refactor

[agent] additional refactor Search