Improve Range class by implementing it as an iterator