Oh, right. Should use xrange there also. I'll fix that and rebase.