Refactored YamlIterator