Improve search function.

This replaces hardcoded strings with references to LexiconContract members.