Simplify rand_in_range, comments