refactored searchForm.js to be tastable and mockable (object oriented js)