Improved `range` operator code.
Improved code processing in XiEnvironment.