Implement proper searching

Fixes #22