Move static bounds checking into a separate module