Fixed bugs in compareTo.
I should probably start testing these things. Probably.