Re-factored search binder code to make it more readable.