Some pretty big changes here.

Collision detection was broken due to unimplemented equals and hashcode
methods in the pair class. As a temporary fix I removed generics and
made pair hold ints. This way we can calculate hashcodes based off of
the values in the pairs. NOTE: I HAVE WRITTEN THE HASHCODE CODE IN A
HUNCH AND HAVE NOT SPENT ANY TIME RESEARCHING HASH COLLISIONS OR THE
PROPER WAY TO HANDLE MAKING PROPER HASH CODES.