Correct syntax errors, simplify inBounds