Updated the union/difference code to remove an extra n^2 translation of ranks. This comes at the cost of extra memory but greatly simplifies the code. Signed-off-by: Nathan Hjelm <hjelmn@me.com>