Ctrl tests refactoring

Refactored and tested up through search controller