Search version 2

Changes to the search algorithm to improve how well it handles non-exact search queries.