Refactored to expose "doSearch()" independent of event handling in the form input so that search can be triggered by outside code.