Add search functionality.

Part of #192.