Added a suite of tests for the search and suggest functions
Fixed bugs encountered when running unit tests.