refactored search controller
Merge pull request #78 from Petercopter/42-header-search-bug

refactored search controller