Add test for xrange
Simplify