move the search logic into its own class
Merge pull request #6 from mkoosej/master

move the search logic into its own class