Refactoring comparer.h