Integrate search

Replaces #386