updated interval() to take Comparables. Added more test cases around branch factor restriction steps.