Cleaned up comparator