Less obtrusive hat-search code.