More code improvements

-- functions agree for all 1-variable tests and some 2-variable tests
-- hashed categories function fails for 3 categorical variables