Refactored Comparator namespace.