Clean up search polling

Fixes #29
Merge pull request #31 from tivac/issue-29

Clean up search polling