surprisingly, there where only 2 bugs.  Both in Rank, getHighCount queried for in instead of id and includeReverse tried to select categoryID from rank which has no categoryID.  All fixed