Fixes in search functionality

Change: Pressing 'Enter' will trigger search
Fix: Search will not work if nothing is written in search box
Fix: Search text is trimmed
Code cleanup