Use IntervalCounter in SetDuelingUnit.
Fix a bug in IntervalCounter.
Fix bugs in paper1301 code.
Add IntervalHelper.