Fixed indentation bug
Changed range to xrange
Minor comments