Refactor Comparator to Operator