Extracted some inner static classes, in hopes to make some java files shorter, and this code easier to test.
Some minor comment fixes.
Enforce that messages be set in the AbstractRangeIterator.