Fixed kPairs. Now it passess the CHECK_pairs check.
New implementation of Bonus.QS