Updated Pair, and rewrote GraphExceptions

Just in case someone needs updated Pair.