Added custom tie breaker support, rated-order output and matching tests