RangeExpression implementation and tests