Lots of reorganization. Added regex_range.