Improve search performance

fixes #9