Added back verifications, range = [start, end)

Reimplemented the verification code from the other versions, and modified Range so it uses [start, end) rather than [start, start + length). This more closely matches the standard C++ range convention.