Iterator implementation + Close function