Simplify bounds-checking