Misc. changes to search implementation.