Fixed tiebreak (SmallestNonzero was too small)
Added some godoc