empty ranges support.
ranges support (need more tests).
Merge branch 'ranges'