Fix bugs in bool comparisons. Add missing functions.
Fix tests of bool comparisons and ufuncs.