Added rangelen support
Merged rangelen changes from dev