Readability in rangewizard.js
Refactored get_ranges, and range_wizard