Better iterator support in classes