comparators refactoring: removed abstract base class, consolidated code