Fix compiler warnings.
Correct typo
Better search design.