Updated search to use multiple nics/sockets. Added some tests and did some
basic cleanup.