Use try-with-resources to ensure that a NodeIterator is always closed
Implement Closeable
[ignore] set variables as immutable