Refactorated some code and changed the events triggering updating searchResultView