Generic Iterator. Should solve memory problems.