Adds search.search and tests

Cleans up connection, removing nbgetpass and uses unitttest.TestCase as the baseclass for TestBase.