Replaced xrange with range.