Fix search feature. Minor cleanup.