Some changes to comparable and comparator.
Fixed conflicts.