Fixed search
Merge pull request #4 from JustinAiken/fix/search

Fixed search.  Needs revisiting for cleaner handling.