Search form performance

Improvements for #115.