Remove bad warnings.

Laurent and Bart are ok with that.
Use xrange instead of range.