Added the ReverseIntervalAlgorithm and fixed some tests.