h-search is implemented and seems to be working ok.

Other minor fixes.